Skip to content

Conversation

@mediocregopher
Copy link
Collaborator

As a more future-proof fix, I've also made the fields of the TrieNodesSorted struct private, and introduced a constructor which will do a debug_assert that the input is already sorted.

As a more future-proof fix, I've also made the fields of the
TrieNodesSorted struct private, and introduced a constructor which
will do a debug_assert that the input is already sorted.
@mediocregopher mediocregopher added C-bug An unexpected or incorrect behavior A-trie Related to Merkle Patricia Trie implementation labels Oct 24, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Reth Tracker Oct 24, 2025
}

Ok(trie_updates)
Ok(TrieUpdatesSorted::new(account_nodes, storage_tries))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This case does not require explicit sorting, as the vecs are constructed in sorted order inherently thanks to the DB

@mediocregopher mediocregopher marked this pull request as ready for review October 24, 2025 15:18
Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense to me, just have a doc nit

@github-project-automation github-project-automation bot moved this from Backlog to In Progress in Reth Tracker Oct 24, 2025
@mediocregopher mediocregopher added this pull request to the merge queue Oct 27, 2025
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

Merged via the queue into main with commit be73e4a Oct 27, 2025
39 of 40 checks passed
@mediocregopher mediocregopher deleted the mediocregopher/from-reverts-sort-fix branch October 27, 2025 11:03
@github-project-automation github-project-automation bot moved this from In Progress to Done in Reth Tracker Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-trie Related to Merkle Patricia Trie implementation C-bug An unexpected or incorrect behavior

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants